from django.shortcuts import render
from rest_framework import serializers,views
from djangomodel.my_rest_framework import MyGenericAPIView
from rest_framework.serializers import Serializer,ModelSerializer
from org.models import OrgModel, UserModel, RoleModel, DepartmentModel
from django.http import JsonResponse



# Create your views here.

# 组织信息管理
class OrgInfoView(MyGenericAPIView):
    models = OrgModel
    http_method_names = ['post']

# 部门信息管理
class DepartmentView(MyGenericAPIView):
    models = DepartmentModel
    http_method_names = ['get','post','put','delete']

# 角色信息管理
class RoleInfoView(MyGenericAPIView):
    models = RoleModel
    http_method_names = ['get','post','put','delete']

# 用户信息管理
class UserInfoView(MyGenericAPIView):
    models = UserModel
    http_method_names = ['get','post','put','delete']


